VARIABLE

Description

This element enables the designer to define custom values to be reused later in the attributes of the elements. It enables the designer to avoid repeats several times the same value in the skin. It makes it easier to change the value once rather than everywhere in the skin code.

Attributes
Name Value Type Default Value Description Comment V.

id

valid element id

empty

id of the variable.

This is the name you will use everywhere in the skin and it will be replaced by the value attribute.

1.3

value

string

empty

value of the variable.

This is the value that will replace the '$Name$' string everywhere in the skin.

1.3

formula

a mathematical formula

empty

The formula can reference other static variables that have been defined previously. The result of the formula is stored in the variable at the declaration of the variable and is not updated later, even if other variables it depends on are changed.

This attributes overrides the "value" attribute when set.

1.7

override

boolean

false

override previously defined value.

Setting this to true removes the warning that is normally thrown when a variable is defined twice.

1.7

Syntax

First declare a variable as shown here:

<VARIABLE id="my_variable" value="hello world!" />

Once this variable has been declared, writing the following

<TEXT value="$my_variable$"/>

is equivalent to writing:

<TEXT value="hello world!"/>